package com.lecture.java8.node;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
//@Builder
public class Node implements INode{

    private Long id;

    private Long parentId;

    private List<INode> children = new ArrayList<>();

    private String nodeName;

    private Integer value;

    public Boolean getHasChildren() {
        return this.children.size() > 0;
    }
}
